const Router = require("koa-router");
const router = new Router({ prefix: "/role" });
const { auth, hasAdminPermission } = require("../middleware/auth.middleware");
const { getRole,addRole,updateRole,deleteRole } = require("../controller/role/role.controller");

router.get("/get-role", getRole);
router.post("/add-role", auth, hasAdminPermission, addRole);
router.put("/update-role", auth, hasAdminPermission, updateRole);
router.delete("/delete-role", auth, hasAdminPermission, deleteRole);
module.exports = router;
